#include <stdio.h>
/********found********/
double fun(int n)
{
    double s = 0,a = 2,b = 1,c = 0;
    for(int i = 0; i < n; i++)
    {
/********found********/
        s=s+a/b;
        c=a;
        a=a+b;
        b=c;
    }
    return s;
}
void main(){
    int n;
    scanf("%d",&n);
    printf("%lf\n",fun(n));
}
